#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
    long long n, k;
    long long count = 0;
    scanf("%lld %lld", &n, &k);
    if (k == 0)
    {
        count = n * n;
    }
    else
    {
        for (int y = k + 1; y <= n; y++)
        {
            count += ((n / y) * (y - k)) + ((n % y >= k) ? (n % y - k + 1) : 0);
        }
    }
    printf("%lld", count);
    return 0;
}